﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SignalShop
{
    public partial class Panel : UserControl
    {
        public Chart Chart { get { return chart1; } }

        public Panel()
        {
            InitializeComponent();
        }

        private void Panel_Load(object sender, EventArgs e)
        {
            
        }

        private void btnRe_Click(object sender, EventArgs e)
        {
            chart1.PlotMode = PlotMode.Re;
            btnIm.Checked = false;
            btnAbs.Checked = false;
            btnArg.Checked = false;
            chart1.Refresh();
        }        

        private void btnIm_Click(object sender, EventArgs e)
        {
            chart1.PlotMode = PlotMode.Im;
            btnRe.Checked = false;
            btnAbs.Checked = false;
            btnArg.Checked = false;
            chart1.Refresh();
        }

        private void btnAbs_Click(object sender, EventArgs e)
        {
            chart1.PlotMode = PlotMode.Abs;
            btnRe.Checked = false;
            btnIm.Checked = false;
            btnArg.Checked = false;
            chart1.Refresh();
        }

        private void btnArg_Click(object sender, EventArgs e)
        {
            chart1.PlotMode = PlotMode.Arg;
            btnRe.Checked = false;
            btnIm.Checked = false;
            btnAbs.Checked = false;            
            chart1.Refresh();
        }

        private void btnLogX_Click(object sender, EventArgs e)
        {
            chart1.LogX = btnLogX.Checked;
            chart1.Refresh();
        }

        private void btnLogY_Click(object sender, EventArgs e)
        {
            chart1.LogY = btnLogY.Checked;
            chart1.Refresh();
        }        
    }
}
